using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RF_Jammer_Base
{
    public partial class JammerGUI : Form
    {
        Jammer parent;
        DelegateAddConsoleText m_DelegateAddConsoleText;

        public JammerGUI(Jammer parent)
        {
            this.parent = parent;
            m_DelegateAddConsoleText = new DelegateAddConsoleText(this.AddConsoleText);
            InitializeComponent();
        }

        public delegate void DelegateAddConsoleText(String str, int level);
        
        private void goButton_Click(object sender, EventArgs e)
        {
            this.parent.EventHandler(Jammer.JammerEvent.GO);
        }

        public void test(string str, int level)
        {
            this.BeginInvoke(m_DelegateAddConsoleText, new Object[] { str, level });
        }

        public void AddConsoleText(string str, int level)
        {
            this.outputTextBox.AppendText(str);
        }
    }
}